package com.mbyte.easy.admin.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mbyte.easy.admin.entity.Allot;
import com.mbyte.easy.admin.entity.Audio;
import com.mbyte.easy.admin.entity.Check;
import com.mbyte.easy.admin.entity.Video;
import com.mbyte.easy.security.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lp
 * @since 2019-12-12
 */
public interface IVideoService extends IService<Video> {

    Long selectUserIdByUsername(String currentUsername);

    /**
     * 张雪
     * 根据用户id查询对应的group_id
     * @param currentUserId
     * @return
     */
    Long selectGroupIdByUserId(Long currentUserId);

   IPage leaderCheckIndex(Video video, Integer pageNo, Integer pageSize);

    Map setGroupStatus();

    int insertCheck(Check check);

    List<Allot> getAllotByAllotId(Long selectUserIdByUsername);

    Video selectById(Long fileId);

    Audio GetGroupIdById(Long id);

    SysUser getUserByUserName(String username);

    List<Allot> getAllotDraftIdByUserId(Long userId);

    Video selectAGroupIdById(Long id);

    IPage<Video> listPage(@Param("page")IPage<Video> page, QueryWrapper<Video> queryWrapper);

    IPage<Video> listPagess(@Param("page")IPage<Video> page, QueryWrapper<Video> queryWrapper);

}
